package com.ux.iot.jetlinks.service.sub;

import com.ux.iot.jetlinks.bo.JetlinkSub;

/**
 * @author caixiaodao
 * @version 1.0
 * 功能描述
 * 产品订阅参数
 * @date 2021/11/16 15:06
 */

public enum ProductSubEnum {
    ONLINE("/online",JetlinkSub.builder().build())	,//DeviceOnlineMessage	设备上线
    OFFLINE("/offline",JetlinkSub.builder().build())	,//DeviceOfflineMessage	设备离线
    MESSAGE_EVENT_EVENTID("/message/event/*",JetlinkSub.builder().build()),//DeviceEventMessage	设备事件
    MESSAGE_PROPERTY_REPORT("/message/property/report"	,JetlinkSub.builder().build()),//ReportPropertyMessage	设备上报属性
    MESSAGE_SEND_PROPERTY_READ("/message/send/property/read"	,JetlinkSub.builder().build()),//ReadPropertyMessage	平台下发读取消息指令
    MESSAGE_SEND_PROPERTY_WRITE("/message/send/property/write"	,JetlinkSub.builder().build()),//WritePropertyMessage	平台下发修改消息指令
    MESSAGE_PROPERTY_READ_REPLY("/message/property/read/reply"	,JetlinkSub.builder().build()),//ReadPropertyMessageReply	读取属性回复
    MESSAGE_PROPERTY_WRITE_REPLY("/message/property/write/reply"	,JetlinkSub.builder().build()),//WritePropertyMessageReply	修改属性回复
    MESSAGE_SEND_FUNCTION("/message/send/function"	,JetlinkSub.builder().build()),//FunctionInvokeMessage	平台下发功能调用
    MESSAGE_FUNCTION_REPLY("/message/function/reply"	,JetlinkSub.builder().build()),//FunctionInvokeMessageReply	调用功能回复
    REGISTER("/register"	,JetlinkSub.builder().build()),//DeviceRegisterMessage	设备注册,通常与子设备消息配合使用
    UNREGISTER("/unregister"	,JetlinkSub.builder().build()),//DeviceUnRegisterMessage	设备注销,同上
    MESSAGE_CHILDREN_CHILDRENDEVICEID_TOPIC("/message/children/*/*"	,JetlinkSub.builder().build()),//ChildDeviceMessage	子设备消息,{topic}为子设备消息对应的topic
    MESSAGE_CHILDREN_REPLY("/message/children/reply/*/*"	,JetlinkSub.builder().build()),//ChildDeviceMessage	子设备回复消息,同上
    MESSAGE_DIREC("/message/direct"	,JetlinkSub.builder().build()),//DirectDeviceMessage	透传消息
    METADATA_DERIVED("/metadata/derived",JetlinkSub.builder().build()),//DerivedMetadataMessage	更新物模型
    RULE_ENGINE("/rule-engine/device/alarm/{productId}/*/*",JetlinkSub.builder().build()),// 事件定义
;
    String topic ;
    JetlinkSub jetlinkSub;

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public JetlinkSub getJetlinkSub() {
        return jetlinkSub;
    }

    public void setJetlinkSub(JetlinkSub jetlinkSub) {
        this.jetlinkSub = jetlinkSub;
    }


    ProductSubEnum(String topic , JetlinkSub jetlinkSub){
        this.topic=topic;
        this.jetlinkSub=jetlinkSub;
    }



}
